﻿using System;
using System.Collections.Generic;
using Iesi.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

using OurSite.Business.Category;
using OurSite.Business.Event;
using OurSite.Business.Picture;

namespace OurSite.WebAdmin.Models
{
    public class EventModel
    {
        public EventModel()
        {
            StartDate = DateTime.Now.ToShortDateString();
            EndDate = DateTime.Now.ToShortDateString();
        }

        [Required]
        [DataType(DataType.Text)]
        [DisplayName("Event ID")]
        public Guid EventId { get; set; }

        [DisplayName("Parent ID")]
        public Guid ParentId { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [DisplayName("Event Code")]
        public int EventCode { get; set; }

        [Required(ErrorMessage = "Event Name is required.")]
        [DataType(DataType.Text)]
        [DisplayName("Event Name")]
        public string EventName { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("Short Description")]
        public string ShortDescription { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("Long Description")]
        public string LongDescription { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("Alternate URL")]
        public string AlternateURL { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("Region")]
        public string Region { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("Country")]
        public string Country { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("State")]
        public string State { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("City")]
        public string City { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("Location")]
        public string Location { get; set; }

        [Required(ErrorMessage = "Start Date required.")]
        [DataType(DataType.Text)]
        [DisplayName("Start Date")]
        public string StartDate { get; set; }

        [Required(ErrorMessage = "End Date required.")]
        [DataType(DataType.Text)]
        [DisplayName("End Date")] 
        public string EndDate { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("Order")]
        public int Order { get; set; }

        [DisplayName("ListingPicture")]
        public Picture ListingPicture { get; set; }

        [DisplayName("Pictures")]
        public IList<Picture> Pictures { get; set; }

        [DisplayName("Event Categories")]
        public IList<Category> EventCategories { get; set; }

        [DisplayName("Parent Categories")]
        public IList<Category> ParentCategories { get; set; }

        [DisplayName("Parent Event")]
        public IList<Event> ParentEvents { get; set; }

        [DisplayName("People")]
        public IList<People> People { get; set; }
    }

    public class ListingImages
    {
        public IList<Event> ParentCategories { get; set; }
        public IList<Event> Decades { get; set; }
        public IList<Event> People { get; set; }
        public IList<Event> Regions { get; set; }

    }

    public class ListingImageEdit
    {
        public string Name { get; set; }
        public Guid Id { get; set; }
        public string Type { get; set; }
        public Picture CurrentLisingImage { get; set; }
        public IList<Picture> PossibleLisingImage { get; set; }
    }
}
